<template>
  <div>
    
    <component  :is="myComponent" @resource-reload="load()"></component>
  </div>
</template>

<script>
// import province from '../policy/index.vue';
import province from './province';
import city from './city';
export default {
  name: "resource",
  components:{
    province,
    city
  },
  data() {
    return {
      myComponent:null,
      mapLevel:2,
    }
  },
  // computed:{
  //   mapLevel: {
  //     get() { return this.$store.state.home.mapLevel },
  //   }
  // },
  mounted() {
   
  },
  methods:{

    jump(){
      // alert('世界')
      this.$emit("redirect", "business", "didiao");
    },
    load(){
      if(this.mapLevel=='1'){
        this.myComponent=province;
      }else{
        this.myComponent=city;
      }
    }
  },
  created(){
  this.mapLevel =  sessionStorage.getItem('resouse_PageType')
  this.load();

  },
}
</script>

<style scoped>

</style>
